<?php

include_once "../config.php";
require_once "../util.php";

connect_db();

$nick = $_REQUEST['nick'];
$sql = "delete from user_statistic where user like '%$nick%'";

$ret = mysql_query($sql);
if (!$ret) {
  echo sprintf("failed:(%s), sql:($sql)", mysql_error());
} else if (mysql_affected_rows() != 1) {
  echo sprintf('success:删除了%d行', mysql_affected_rows());
} else {
  echo "success";
}
?>